﻿using System;
using System.Runtime.InteropServices;

namespace Ast.Core.Services.ObjectDefinitions
{
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
    public struct ObjectHandleCountEntry
    {
        public IntPtr Process; // +0x000 Process          : Ptr32 _EPROCESS

        public int HandleCountLockCount;

        public int HandleCount // +0x004 HandleCount      : Pos 0, 24 Bits
        {
            get { return HandleCountLockCount >> 8; }
        }

        public int LockCount // +0x004 LockCount        : Pos 24, 8 Bits
        {
            get { return HandleCountLockCount & 0xFF; }
        }
    }
}